{include file="public/header" /}
    <style>
        .minHeightbg {
            min-height: 100%;
            background: url("/static/home/a036_39.png") no-repeat center;
            background-size: cover;
        }
        body {
            background: none;
        }
        .inputthbimg {
            height:55px;
            overflow: hidden;
            text-align:center;
            margin:60px 0px 0px 0px;
        }
        .inputthbimg img {
            height:100%;
        }
        .touminhezi {
            width: 85%;
            margin:0 auto;
            margin-top:4em;
        }
        .inputthbox {
            height:44px;
            border-radius: 3px;
            background-color: hsla(0,0%,100%,.2);
            margin-bottom:15px;
            position: relative;
        }
        .inputthbox .imgic {
            height:20px;
            width:20px;
            position: absolute;
            left:15px;
            top:10px;
        }
        .inputthbox input {
            background:none;
            border:none;
            height:42px;
            line-height: 42px;
            padding-left:55px;
            color:#cccccc;
            font-size:14px;
        }
        .inputthbox input::-webkit-input-placeholder {color:#aaaaaa;}
        .inputthbox input:-moz-placeholder {color:#aaaaaa;}
        .inputthbox input::-moz-placeholder {color:#aaaaaa;}
        .inputthbox input:-ms-input-placeholder {color:#aaaaaa;}
        .inputthbox .yanzhmimg {
            position: absolute;
            top:4px;
            right:4px;
            border-radius: 3px;
            height:28px;
        }
        .linkchuqu {
            margin-top:10px;
            line-height: 30px;
            text-align: center;
        }
        .operatingAN {
            display: inline-block;
            width: 100%;
            text-align: center;
            height: 50px;
            line-height:50px;
            padding: 0px;
            background:#CFB283;
            color: #fff;
            border: none;
            letter-spacing: 2px;
            font-size:16px;
            font-family:"仿宋";
            margin-top:1.8em;
        }
        .linkchuqu .linkA {color:#cfb283;font-size:0.9em;}
    </style>
<meta name="__hash__" content="2304e632dec1fe9893ddb13294a068f7_d36a82ae75cb9b5e0815d866d9d8765f"><link id="layuicss-layer" rel="stylesheet" href="/static/home/layer.css" media="all"></head>
<body style="">
<header id="header" class="mui-bar mui-bar-nav">
    <h1 class="mui-title">{:config('base.webtitle')}</h1>
    <div class="mui-pull-right" style="display: none;">
        <div class="mui-switch mui-active" data-switch="2">
            <div class="mui-switch-handle"></div>
        </div>
    </div>
</header>
<div id="pullrefresh" class="mui-content mui-scroll-wrapper" data-scroll="1">
    <div class="mui-scroll" style="transform: translate3d(0px, 0px, 0px) translateZ(0px); transition-duration: 0ms;">
        <div class="inputthbimg">
            <img src="/static/home/5bd971da415cf.png" alt="" style="width: 150px;height: 30px;">
        </div>
        <div id="item1" class="touminhezi">
            <form>
                <div class="inputthbox mui-input-row">
                    <img src="/static/home/a036_41.png" alt="" class="imgic">
                    <input type="number" autocapitalize="on" name="usernames" autocomplete="off" class="mui-input-clear" placeholder="{:lang('请输入账号')}" data-input-clear="3"><span class="mui-icon mui-icon-clear mui-hidden"></span>
                </div>
                <div class="inputthbox mui-input-row">
                    <img src="/static/home/a036_42.png" alt="" class="imgic">
                    <input onfocus="this.type='password'" name="password" autocomplete="off" class="mui-input-password" placeholder="{:lang('请输入登录密码')}" data-input-password="4"><span class="mui-icon mui-icon-eye"></span>
                </div>
                <button type="button" class="mui-btn mui-btn-primary operatingAN accountLogin">{:lang('立即登录')}</button>
            <input type="hidden" name="__hash__" value="2304e632dec1fe9893ddb13294a068f7_d36a82ae75cb9b5e0815d866d9d8765f"></form>
            <div class="linkchuqu"><a href="http{php}echo isset($_SERVER['HTTPS']) ? 's':''{/php}://{php}echo $_SERVER['HTTP_HOST']{/php}{:url('forgotIndex')}" class="linkA">{:lang('忘记密码')}</a></div>
        </div>
    </div>
{include file="public/footer" /}
<script src="/static/home/zfuwl.js"></script>
<script>
    mui('.mui-scroll-wrapper').scroll({
        deceleration: 0.0005
    });

    var mask=mui.createMask();
    mui('body').on('tap', '.accountLogin', function () {
        var obj = $(this);
        var username = $("input[name='usernames']").val();
        var verify_code = $("input[name='verify_code']").val();
        var password = $("input[name='password']").val();
        mui.closePopup();
        if (username == '') {
            return mui.toast('{:lang('请输入账号')}', {duration: 'short', type: 'div'});
        }
        if (verify_code == '') {
            return mui.toast('请输入验证码', {duration: 'short', type: 'div'});
        }
        if (password == '') {
            return mui.toast('{:lang('请输入登录密码')}', {duration: 'short', type: 'div'});
        }
        $(obj).attr('disabled', 'true');
        mui.showLoading("登录中","div");
        document.activeElement.blur();
        mask.show();//显示遮罩层
        $.ajax({
            type: 'post',
            url: "{:url('Login/doLogin')}",
            data: {username: username, password: password, verify_code: verify_code},
            dataType: 'json',
            success: function (res) {
                mask.close();//关闭遮罩层
                mui.hideLoading();
                if (res.status == 1) {
                    mui.toast(res.msg, {duration: '2000', type: 'div'});
                    setTimeout(function () {
                        mui.openWindow({
                            id: res.url,
                            url: "http{php}echo isset($_SERVER['HTTPS']) ? 's':''{/php}://{php}echo $_SERVER['HTTP_HOST']{/php}" + res.url
                        });
                    }, 1000);
                } else {
                    refreshVerify();
                    $(obj).removeAttr('disabled');
                    return mui.toast(res.msg, {duration: '2000', type: 'div'});
                }
            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
                return mui.toast('网络失败，请刷新页面后重试', {duration: '2000', type: 'div'});
            }
        });
    });

    function refreshVerify() {
        $('.imgYzm').attr('src', '/Login/verify/type/login_index.html');
    }

    var smsObj = [];
    // 发送手机短信
    function send_sms_reg_code(obj){
        smsObj = obj;
        var mobile = $('#mobile').val();
        if(!checkMobile(mobile)){
            mui.toast('请输入正确的手机号码',{ duration:'long', type:'div' });
            return;
        }
                var data = {mobile:mobile};        var url = "/Reg/sendSmsRegCode.html";
        mui.showLoading("正在发送","div");
        mask.show();//显示遮罩层
        $.post(url, data, function(data){
            mask.close();//关闭遮罩层
            mui.hideLoading();
            obj = $.parseJSON(data);
            if(obj.status == 1){
                $(smsObj).attr("disabled","disabled");
                intAs = 600; // 手机短信超时时间
                jsInnerTimeout(intAs);
                mui.toast(obj.msg,{ duration:'long', type:'div' });
            } else {
                mui.toast(obj.msg,{ duration:'long', type:'div' });
            }
        });
    }
    //倒计时函数
    function jsInnerTimeout(intAs){
        intAs--;
        if(intAs<=-1){
            $(smsObj).removeAttr("disabled");
            $(smsObj).text("获取验证码");
            return true;
        }
        $(smsObj).text(intAs+'秒');
        setTimeout("jsInnerTimeout("+intAs+")",1000);
    };
</script>


</body></html>